package com.hzncc.flowable_diboot.vo;

import com.diboot.core.binding.annotation.*;
import com.diboot.core.vo.FileVO;
import com.diboot.core.vo.LabelValue;
import com.diboot.iam.entity.IamOrg;
import com.diboot.iam.entity.IamPosition;
import com.diboot.iam.entity.IamRole;
import com.diboot.iam.entity.IamUser;
import com.diboot.file.entity.FileRecord;
import com.diboot.tenant.entity.IamTenant;
import com.hzncc.flowable_diboot.entity.EquipmentFollow;
import com.hzncc.flowable_diboot.entity.Equipment;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.util.List;
/**
* 设备追踪 VO定义
* @author MyName
* @version 1.0
* @date 2024-07-03
* Copyright © MyCorp
*/
@Getter @Setter @Accessors(chain = true)
public class EquipmentFollowListVO extends EquipmentFollow  {
private static final long serialVersionUID = 1274997671171128510L;
    /**
    * 跟进方式 关联字典选项
    */
    @BindDict(
    type = "FOLLOW_WAY",
    field = "followWay"
    )
    private LabelValue followWayLabel;

    /**
    * 信息级别 关联字典选项
    */
    @BindDict(
    type = "INFO_RANK",
    field = "infoRank"
    )
    private LabelValue infoRankLabel;

    /**
    * 机床编号 关联信息
    */

    @BindField(
        entity = Equipment.class,
        field = "machineNumber",
        condition = "this.machine_number = id"
     )
    private String machineNumberLabel;

    /**
    * 附件 关联文件信息
    */
    @BindEntityList(entity = FileRecord.class, condition = "this.annex = id", splitBy = ",")
    private List<FileVO> annexFiles;

    /**
    * 创建人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.create_by = id"
     )
    private String createByLabel;

    /**
    * 更新人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.update_by = id"
     )
    private String updateByLabel;

}